home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Examples / PPCExamples / CPlusExamples / CPlusTESample / TESampleGlue.a < prev   
Encoding:
Text File  |  1998-12-03  |  1.4 KB  |  58 lines  |  [TEXT/MPS ]

  1. *
  2. *    Apple Macintosh Developer Technical Support
  3. *
  4. *    MultiFinder-Aware Simple TextEdit Sample Application
  5. *
  6. *    TEDocument
  7. *
  8. *    TESampleGlue.a        -    Assembler Source
  9. *
  10. *    Copyright © 1988, 1989 Apple Computer, Inc.
  11. *    All rights reserved.
  12. *
  13. *    Versions:    
  14. *            1.10                     07/89
  15. *            1.00                     04/89
  16. *
  17. *    Components:
  18. *            TEDocument.o.make        October 10, 1989
  19. *            TDocument.h                July      9, 1989
  20. *            TECommon.h                July      9, 1989
  21. *            TEDocument.h            July      9, 1989
  22. *            TEDocument.cp            July      9, 1989
  23. *
  24.  
  25. ;
  26. ;    ASMCLICKLoop
  27. ;
  28. ;    This routine gets called by the TextEdit Manager from TEClick.
  29. ;    It calls the old, default click loop routine that scrolls the
  30. ;    text, and then calls our own Pascal routine that handles
  31. ;    tracking the scroll bars to follow along.  It doesn't bother
  32. ;    with saving registers A0 and D0, because they are trashed
  33. ;    anyway by TextEdit.
  34. ;
  35.  
  36. ASMCLICKLoop    PROC        EXPORT
  37.  
  38.             IMPORT        GETOLDCLICKLOOP
  39.             IMPORT        PASCALCLICKLOOP
  40.             
  41.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  42.             
  43.             CLR.L        -(SP)                ; make space for procedure pointer
  44.             JSR            GETOLDCLICKLOOP        ; get the old clickLoop
  45.             MOVEA.L        (SP)+,A0            ; into A0
  46.             
  47.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  48.             JSR            (A0)                ; and execute old clickLoop
  49.  
  50.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  51.             JSR            PASCALCLICKLOOP        ; do our clickLoop
  52.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  53.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  54.             RTS
  55.  
  56.             END 
  57.  
  58.